package com.dy.joinThread;

public class joinThread {
    public static void main(String[] args) throws InterruptedException {

        Thread thread = new Thread(new runnable());
        System.err.println("main执行");
        thread.start();
        thread.join();
        System.err.println("main结束");


    }
}
class runnable implements Runnable{

    @Override
    public void run() {
        System.err.println("线程运行等待测试");
    }
}
